import React,{Component} from 'react';
import {Link} from 'react-router-dom';
import './nowPlayingList.css';
class NowPlayingList extends Component{
//	constructor(props){
//		super(props);
//	}
	render(){
		return(
				<ul  className ='NowPlayingList'>
					{
						this.props.nowPlayingList.map((item)=>
						<li key={item.id}>
							<Link to= {'/detail/'+item.id}>
								<div className='NowPlayingList-item' >
									<div>
										<img src={item.cover.origin} alt={item.name}/>
									</div>
									<div className='NowPlayingList-span'>
										<span>{item.name}</span>
										<span className='span1'>{item.grade}</span><br />
										<span className='span2'>{item.cinemaCount}家影院上映{item.watchCount}人购票</span>
									</div>
								</div>
							</Link>
						</li>
						)
				}
					<div className="more-button">更多热映电影</div>
					<div className="dividing-line"><div className="upcoming">即将上映</div></div>
				</ul>
		)
	}
}



//输出
export default NowPlayingList;